﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using RuleCode.Table;

namespace map
{
    public partial class lvyou : System.Web.UI.Page
    {
        /// <summary>
        /// 处理激活脚本
        /// </summary>
        /// <param name="e"></param>
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            string ScriptTag =
            "<script type=\"text/javascript\">initialize();</script>"
            ;

            ClientScript.RegisterStartupScript(GetType(), "bodyevent", ScriptTag);
        }


        protected void Page_Load(object sender, EventArgs e)
        {
            AjaxPro.Utility.RegisterTypeForAjax(typeof(AjaxFunction));
            cbuser.dealcookie();
            if (!IsPostBack)
            {
                if (AliApi.appUserId == "")
                {
                    HyperLink_login.Text = "登录";
                    HyperLink_login.NavigateUrl = ResolveUrl("~/member/login.aspx") + "?redirecturl=" + this.Request.Url;

                    HyperLink_logout.NavigateUrl = ResolveUrl("~/member/regist1.aspx") + "?redirecturl=" + this.Request.Url;
                    HyperLink_logout.Text = "注册";
                }
                else
                {
                    HyperLink_login.Text = AliApi.appNickName;
                    HyperLink_login.NavigateUrl = "#";
                    HyperLink_logout.NavigateUrl = ResolveUrl("~/member/loginout.aspx") + "?redirecturl=" + this.Request.Url;
                    HyperLink_logout.Text = "注销";
                }
            }
        }
    }
}
